<?php
    @header("Content-Type:text/html;charset=utf-8");    // 配置php文件返回的 文本类型 编码(适应低版本)         => php 向 前端 返回的数据类型

// 数据库连接通用代码

    const host = "localhost:3306";
    const user = "root";
    const pwd = "zhouyu000";
    const dbName = "2020";

    $conn = mysqli_connect(host,user,pwd,dbName);
// 适配低版本  
    mysqli_query($conn,"set names utf8"); 
    mysqli_query($conn,"set character set utf-8"); 
?>